﻿@model MvcApplication6.Models.Category_eventModel
@{
    ViewBag.Title = "categoryEvent";
}

<link href="../../Content/css/nn-styles.css" rel="stylesheet" type="text/css"/>
<title>Add Menu | CÔNG TY TNHH TM DV KT CÔNG NGHỆ AN PHÚ </title>

<!-- show thong tin Sale Person-->

<div>
    <h1 class="ad-title"><center>Category Event</center></h1>

    <fieldset style="margin-left:100px;margin-right:100px;">
        <table class="gridview">
                <tr>
                    <th>Name</th>
                    <th>Content Template</th>
                    <th>Chức năng</th>
                </tr>
            @foreach (var p in ViewBag.categoryEvent)
            {
                <tr>
                    <td>@p.Name</td>
                    <td>@p.Content_template</td>

                    <td style="text-align:center">
                        <a class="button" href="/CategoryEvent/categoryEvent/@p.Id?cmdEdit=1">Edit</a>
                        <a class="button" href="/CategoryEvent/categoryEvent/@p.Id?cmdDelete=1">Delete</a>
                    </td>
                </tr>
            }
    
        </table>
    </fieldset>

    @using (Html.BeginForm("categoryEvent", "CategoryEvent", FormMethod.Post, new { id = "add_news" }))
    {
        @Html.AntiForgeryToken() <!--Chống giả lập yêu cầu -->
        @Html.ValidationSummary(true) <!-- hiện thị kiểm lỗi phía Server-->
        <fieldset>
            <a class="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="margin-left:127px;margin-bottom:15px;" href="/CategoryEvent/categoryEvent">Add New</a>
            <a class="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="margin-left:127px;margin-bottom:15px;" href="http://aptechpro.vn/">Trang chủ</a>   
           
            <p>
                <label for="name"><b>Name:</b></label>
                @Html.TextBoxFor(model => model.Name, new { name = "Name", id = "Name", type = "text", style = "width:292px" })
                @Html.ValidationMessageFor(model => model.Name)
            </p>

            <p>
                <label for="position"><b>Content template:</b></label>
                @Html.TextBoxFor(model => model.Content_template, new { name = "Content_template", id = "Content_template", type = "text", style = "width:294px" })
                @Html.ValidationMessageFor(model => model.Content_template)
            </p>

            <div class="btn-submit">
                <input type="submit" name="cmdInsert" class="btn_contact" value="Insert" />
                <input type="submit" name="cmdUpdate" class="btn_contact" value="Update" />
            </div>
        </fieldset> 
    }
</div><!-- end.content-->